/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SelectWarranty.java
 *
 * Created on Feb 13, 2009, 4:59:56 AM
 */

package magis;

/**
 *
 * @author Jason Whiting
 */
public class SelectWarranty extends javax.swing.JFrame {

    /** Creates new form SelectWarranty */
    public SelectWarranty() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        selectWarrantyGroup = new javax.swing.JPanel();
        warranty_cmb = new javax.swing.JComboBox();
        months_cmb = new javax.swing.JComboBox();
        miles_cmb = new javax.swing.JComboBox();
        warranty_lbl = new javax.swing.JLabel();
        months_lbl = new javax.swing.JLabel();
        miles_lbl = new javax.swing.JLabel();
        miles_lbl1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        addCar_btn2 = new javax.swing.JButton();
        addCar_btn1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        selectWarrantyGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Add Warranty"));

        warranty_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "None", "Warranty 1", "Warranty 2", "Warranty 3" }));
        warranty_cmb.setToolTipText("Please select a warranty from the list");
        warranty_cmb.setMinimumSize(new java.awt.Dimension(100, 18));
        warranty_cmb.setPreferredSize(new java.awt.Dimension(100, 20));
        warranty_cmb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                warranty_cmbActionPerformed(evt);
            }
        });

        months_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "12", "24", "36", "48" }));
        months_cmb.setToolTipText("Please select the number of months");

        miles_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "50,000", "100,000", "150,000", "200,000" }));
        miles_cmb.setToolTipText("Please select the number of miles for the warranty");

        warranty_lbl.setText("Warranty:");

        months_lbl.setText("Months:");

        miles_lbl.setText("Miles:");

        miles_lbl1.setText("Cost:");

        jTextField1.setText("3000");

        javax.swing.GroupLayout selectWarrantyGroupLayout = new javax.swing.GroupLayout(selectWarrantyGroup);
        selectWarrantyGroup.setLayout(selectWarrantyGroupLayout);
        selectWarrantyGroupLayout.setHorizontalGroup(
            selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(selectWarrantyGroupLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(selectWarrantyGroupLayout.createSequentialGroup()
                        .addComponent(months_lbl)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)
                        .addComponent(months_cmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(selectWarrantyGroupLayout.createSequentialGroup()
                        .addComponent(warranty_lbl)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(warranty_cmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, selectWarrantyGroupLayout.createSequentialGroup()
                        .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(miles_lbl)
                            .addComponent(miles_lbl1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE)
                        .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jTextField1)
                            .addComponent(miles_cmb, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );
        selectWarrantyGroupLayout.setVerticalGroup(
            selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(selectWarrantyGroupLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(warranty_cmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(warranty_lbl))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(months_cmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(months_lbl))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(miles_cmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(miles_lbl))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(selectWarrantyGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(miles_lbl1)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        warranty_cmb.getAccessibleContext().setAccessibleName("warrantyComboBox");
        months_cmb.getAccessibleContext().setAccessibleName("monthsComboBox");
        miles_cmb.getAccessibleContext().setAccessibleName("milesComboBox");
        warranty_lbl.getAccessibleContext().setAccessibleName("warrantyLabel");
        months_lbl.getAccessibleContext().setAccessibleName("monthsLabel");
        miles_lbl.getAccessibleContext().setAccessibleName("milesLabel");

        getContentPane().add(selectWarrantyGroup, java.awt.BorderLayout.CENTER);

        addCar_btn2.setFont(new java.awt.Font("Tahoma", 0, 8));
        addCar_btn2.setText("Cancel");
        jPanel2.add(addCar_btn2);

        addCar_btn1.setFont(new java.awt.Font("Tahoma", 0, 8));
        addCar_btn1.setText("Add Warranty");
        jPanel2.add(addCar_btn1);

        getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void warranty_cmbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_warranty_cmbActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_warranty_cmbActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SelectWarranty().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addCar_btn1;
    private javax.swing.JButton addCar_btn2;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JComboBox miles_cmb;
    private javax.swing.JLabel miles_lbl;
    private javax.swing.JLabel miles_lbl1;
    private javax.swing.JComboBox months_cmb;
    private javax.swing.JLabel months_lbl;
    private javax.swing.JPanel selectWarrantyGroup;
    private javax.swing.JComboBox warranty_cmb;
    private javax.swing.JLabel warranty_lbl;
    // End of variables declaration//GEN-END:variables

}
